package br.ufmg.dees.insane.model.geo.halfEdgeDataStructure;

import java.io.Serializable;
import java.util.HashMap;
import java.util.LinkedList;

public class Face implements Serializable{

	/**   */
	private static final long serialVersionUID = 1L;
	
	private LinkedList<Loop> loopList = new LinkedList<Loop>();
	private HashMap<String, Object> values;
	private PlanarSubdivision planarSubdivision;
	private String id;
	
	/**
	 * 
	 */
	public Face() {
		this.values = new HashMap<String, Object>();
	}
	
	/**
	 * 
	 */
	public Face(String id, Loop aloop ) {
		this.id = id;
		this.loopList.add(aloop);
		this.values = new HashMap<String, Object>();
	}
		
	/**
	 * @return Returns the planarSubdivision.
	 */
	public PlanarSubdivision getPlanarSubdivision() {
		return planarSubdivision;
	}

	/**
	 * @param planarSubdivision The planarSubdivision to set.
	 */
	public void setPlanarSubdivision(PlanarSubdivision planarSubdivision) {
		this.planarSubdivision = planarSubdivision;
	}

	/**
	 * @return Returns the index.
	 */
	public String getId() {
		return id;
	}

	/**
	 * @param index The index to set.
	 */
	public void setIndex(String id) {
		this.id = id;
	}

	/**
	 * @return Returns the loopList.
	 */
	public LinkedList<Loop> getLoopList() {
		return loopList;
	}

	/**
	 * @param loopList The loopList to set.
	 */
	public void setLoopList(LinkedList<Loop> loopList) {
		this.loopList = loopList;
	}

	/**
	 * @return Returns the coords.
	 */
	public Object getValue(String key) {
		return this.values.get(key);
	}

	/**
	 * @param coords The coords to set.
	 */
	public void setValue(String key, Object value) {
		this.values.put(key, value);
	}
    
	  /** Returns true if the node has the point values for the key.
     * @param key The key of the point values.
     * @return True if the node has the point values for the key.
     */
    public boolean valuesContainsKey(String key) {
        return this.values.containsKey(key);
    }

	/**
	 * The method return the values.
	 * @return Returns The values.
	 */
	public HashMap<String, Object> getValues() {
		return this.values;
	}

	/**
	 * The method set the field values from the parameter values.
	 * @param values The values to set.
	 */
	public void setValues(HashMap<String, Object> values) {
		this.values = values;
	}
	
//*****************************************************************************************
}
